package com.wx.gof.pattern.structural.adapter.mvc;

/**
 * @ClassName ComplexControllerAdapter
 * @Author wx
 * @Description 复杂类型的Controller适配器
 * @Date 2018-12-08-21:59
 */
public class ComplexControllerAdapter implements IAdapterTarget{

    private ComplexController complexController;

    @Override
    public boolean validation(Object adapter) {
        if (adapter instanceof ComplexController){
            this.complexController = (ComplexController)adapter;
            return true;
        }
        return false;
    }



    @Override
    public void run() {
        System.out.println("根据请求内容做反射操作。。。。");
        System.out.println("记录日志操作。。。。");
        complexController.complexRequest();;
    }
}
